/* eslint-disable */
import request from "@/util/request";

/** 此处后端没有提供注释 POST /question/delete */
export async function delete2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.delete2Params,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/question/delete", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/edit */
export async function edit(
  body: API.QuestionEditDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/question/edit", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/query/all */
export async function queryAll(
  body: API.QuestionQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.ResultResultPageQuestionVo>("/question/query/all", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /question/query/one/${param0} */
export async function queryOneById3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryOneById3Params,
  options?: { [p: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultQuestionVo>(`/question/query/one/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/register */
export async function addQuestionPost(
  body: API.QuestionAddDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/question/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/update */
export async function update3(
  body: API.QuestionUpdateDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/question/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/**获取app应该的id和名称map*/
export async function queryQuestionIdAndNameMap(
  params: any,
  options?: { [key: string]: any }
) {
  return request<API.ResultAppVo>(`/question/questionIdName`, {
    method: "GET",
    params: params,
    ...(options || {}),
  });
}
